package com.ruoyi.team.mapper;

import java.util.List;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.team.domain.StockBill;
import com.ruoyi.team.domain.StockBillItem;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

/**
 * 出入库单据Mapper接口
 *
 * @author ruoyi
 * @date 2022-11-28
 */
@Component
public interface StockBillMapper extends BaseMapper<StockBill> {

    List<Long> selectGoodIds(Long storeId);

    /**
   * 查询出入库单据列表
   *
   * @param stockBill 出入库单据
   * @return 出入库单据集合
   */
  public List<StockBill> selectStockBillList(StockBill stockBill);

  // 根据仓库 id 删除商品仓库关系表
  void deleteBatchGoodAndStoreRelation(@Param("sId") Long sId, @Param("gIds") List<Long> gIds);

  void batchInsertRelation(@Param("storeId") Long storeId, @Param("list") List<StockBillItem> list);

  // 批量新增单据表
  void batchInsertBillItem(@Param("billId") Long billId, @Param("list") List<StockBillItem> list);

    List<Long> selectGoodIdsRelation(Long storeId);
}
